home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6779 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  50 lines

  1. Path: ens-cachan.fr!news
  2. From: Gabriel Dos Reis <dosreis@DPTMaths.ENS-Cachan.Fr>
  3. Newsgroups: comp.lang.c++
  4. Subject: Help
  5. Date: 09 Feb 1996 22:13:05 +0100
  6. Organization: ╔cole Normale SupΘrieure de Cachan
  7. Sender: dosreis@ens-cachan.fr (Kodjo Dos Reis)
  8. Message-ID: <v8vhgx0gq3i.fsf@dptmaths.ens-cachan.fr>
  9. NNTP-Posting-Host: dptmaths.ens-cachan.fr
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Newsreader: (ding) Gnus v0.86
  14.  
  15.  
  16.  
  17.  
  18. Hi!
  19.  
  20. I've got some problems with C++
  21. Could someone explain me why the compiler complains about this code
  22.  
  23. typedef int myarray[10];
  24.  
  25. myarray* x;
  26.  
  27. x = new myarray; // the compiler complains here
  28.  
  29. But this code seems to work
  30.  
  31. x = new myarray[1]
  32.  
  33.  
  34.  
  35.     Gaby.
  36.  
  37.  
  38. -- 
  39.               Gabriel Dos Reis
  40.    dosreis@dptmaths.ens-cachan.fr      |       dosreis@yoko.ens-cachan.fr
  41.              http://yoko.ens-cachan.fr:8080/~dosreis/
  42.  
  43.                           Combien tout ce qu'on dit est loin de ce qu'on pense.
  44.                           Que la bouche et le coeur sont peu d'intelligence. 
  45.         
  46.                                             RACINE, Britannicus Acte V,ScΦne I.
  47.  
  48.  
  49.  
  50.